package com.smallprogram.www.entity;


import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

public class ResultEntity<T> {

    private Integer code;
    private String message;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private T data;

    public ResultEntity(){
        super();
    }
    public ResultEntity(Integer code,String message){
        this.code = code;
        this.message = message;
    }
    public ResultEntity(Integer code,String message,T data){
        this(code, message);
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public T getData() {
        return data;
    }
}
